package com.jvup.gameshow.activity;

import android.os.Bundle;

import androidx.annotation.Nullable;

import com.jvup.gameshow.R;
import com.jvup.common.support.base.BaseActivity;
import com.jvup.common.inject.EventControllerInjector;
import com.jvup.common.inject.ViewModelInjector;
import com.jvup.common.constant.Navigation;
import com.jvup.gameshow.controller.HomeEventController;
import com.jvup.gameshow.databinding.ActivityHomeBinding;
import com.jvup.gameshow.model.viewModel.impl.HomeViewModel;

import com.qire.antscore.annotation.RouteMapping;

import com.qire.antsrouter.inject.Autowired;

/**
 * 首页
 */
@RouteMapping(path = Navigation.Page.HomePage)
public class HomeActivity extends BaseActivity<ActivityHomeBinding> {

    @Autowired(injector = ViewModelInjector.class)
    private HomeViewModel viewModel;
    @Autowired(injector = EventControllerInjector.class)
    private HomeEventController controller;

    @Override
    public int layoutRid() {
        return R.layout.activity_home;
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        AntsRouter.ROUTER.buildCard(Navigation.Fragment.UserFragment).navigation();
//        AntsRouter.ROUTER.<RoomCard>buildCard(Navigation.Fragment.UserFragment)
//                .withData("controller",controller)
//                .to(this,R.id.frame_home);
//        getSupportFragmentManager().beginTransaction().add(R.id.frame_home, UserFragment.newInstance(),"user").commitAllowingStateLoss();
    }

}
